package com.imooc.juc.bean;

import java.util.concurrent.TimeUnit;

/**
 * @Date:2021/11/5/22:57
 * @Description:资源类，能发短信和邮箱 2个方法
 */
public class Phone {

    public synchronized static void sendEmail(){
        try {
            TimeUnit.SECONDS.sleep(4);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("----------------email");
    }


    public  void getHello(){
        System.out.println("----------------Hello");

    }

    public synchronized void sendSMS(){
        System.out.println("----------------sms");

    }




}
